{% from "result_lines.html" import result_lines -%}

{% macro results_list(results, www_root, tree) -%}
  {% for result in results %}
    <div class="result" data-path="{{ result.path }}">
      <div class="result-head">
        <div class="left-column">
          <div class="{{result.iconClass}} icon-container"></div>
        </div>
        <div>{{ result.pathLine|safe }}</div>
      </div>
      {{ result_lines(result, www_root, tree) }}
    </div>
  {% endfor %}
{%- endmacro %}

{# When not being included as a macro, render the code above. #}
{{ results_list(results, www_root, tree) }}
